package com.example.demo3;

import com.example.demo3.mapper.MessageInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {

    @Autowired
    private MessageInfoMapper messageInfoMapper;
    public List<MessageInfo> selectAll(){
        return messageInfoMapper.selectAll();
    }

    public void insertMessage(MessageInfo messageInfo) {
        messageInfoMapper.insert(messageInfo);
    }
}
